package graphicInterface;

import javax.swing.JPanel;
import java.awt.GridLayout;
import java.awt.GridBagLayout;
import java.awt.BorderLayout;
import javax.swing.BoxLayout;
import javax.swing.JTextField;
import java.awt.GridBagConstraints;
import javax.swing.JRadioButton;
import java.awt.Insets;
import javax.swing.JTextPane;
import javax.swing.JButton;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.border.EmptyBorder;
import javax.swing.SwingConstants;

public class subGUI_NewRecipies extends JPanel {
    private JPanel step;
    private JTextField textField;
    private JButton btnNext;
    
    public subGUI_NewRecipies() {
        step =  new JPanel();
        setInformation();
        this.add(step);
    }
    
    private void setInformation(){
        step.setBorder(new EmptyBorder(30, 0, 30, 0));
        GridBagLayout gridBagLayout = new GridBagLayout();
        gridBagLayout.columnWidths = new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
        gridBagLayout.rowHeights = new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
        gridBagLayout.columnWeights = new double[]{0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE};
        gridBagLayout.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
        step.setLayout(gridBagLayout);
    
    JLabel lblGeneralInformation = new JLabel("RECIPE INFORMATION");
    lblGeneralInformation.setHorizontalAlignment(SwingConstants.CENTER);
    lblGeneralInformation.setFont(new Font("Nasalization", Font.BOLD, 18));
    GridBagConstraints gbc_lblGeneralInformation = new GridBagConstraints();
    gbc_lblGeneralInformation.insets = new Insets(0, 0, 5, 5);
    gbc_lblGeneralInformation.gridx = 7;
    gbc_lblGeneralInformation.gridy = 2;
    step.add(lblGeneralInformation, gbc_lblGeneralInformation);
    
    JLabel lblName = new JLabel("Name");
    GridBagConstraints gbc_lblName = new GridBagConstraints();
    gbc_lblName.gridwidth = 4;
    gbc_lblName.insets = new Insets(0, 0, 5, 5);
    gbc_lblName.gridx = 2;
    gbc_lblName.gridy = 4;
    step. add(lblName, gbc_lblName);
    
    textField = new JTextField();
    GridBagConstraints gbc_textField = new GridBagConstraints();
    gbc_textField.gridwidth = 3;
    gbc_textField.insets = new Insets(0, 0, 5, 5);
    gbc_textField.fill = GridBagConstraints.HORIZONTAL;
    gbc_textField.gridx = 6;
    gbc_textField.gridy = 4;
    step.add(textField, gbc_textField);
    textField.setColumns(10);
    
    JLabel lblDifficult = new JLabel("Difficult");
    GridBagConstraints gbc_lblDifficult = new GridBagConstraints();
    gbc_lblDifficult.gridwidth = 4;
    gbc_lblDifficult.insets = new Insets(0, 0, 5, 5);
    gbc_lblDifficult.gridx = 2;
    gbc_lblDifficult.gridy = 5;
    step.add(lblDifficult, gbc_lblDifficult);
    
    JRadioButton rdbtnEasy = new JRadioButton("Easy");
    GridBagConstraints gbc_rdbtnEasy = new GridBagConstraints();
    gbc_rdbtnEasy.insets = new Insets(0, 0, 5, 5);
    gbc_rdbtnEasy.gridx = 6;
    gbc_rdbtnEasy.gridy = 5;
    step.add(rdbtnEasy, gbc_rdbtnEasy);
    
    JRadioButton rdbtnMedium = new JRadioButton("Medium");
    GridBagConstraints gbc_rdbtnMedium = new GridBagConstraints();
    gbc_rdbtnMedium.fill = GridBagConstraints.HORIZONTAL;
    gbc_rdbtnMedium.insets = new Insets(0, 0, 5, 5);
    gbc_rdbtnMedium.gridx = 7;
    gbc_rdbtnMedium.gridy = 5;
    step.add(rdbtnMedium, gbc_rdbtnMedium);
    
    JRadioButton rdbtnHard = new JRadioButton("Hard");
    GridBagConstraints gbc_rdbtnHard = new GridBagConstraints();
    gbc_rdbtnHard.insets = new Insets(0, 0, 5, 5);
    gbc_rdbtnHard.gridx = 8;
    gbc_rdbtnHard.gridy = 5;
    step.add(rdbtnHard, gbc_rdbtnHard);
    
    btnNext = new JButton("NEXT");
    btnNext.setVerticalAlignment(SwingConstants.BOTTOM);
    GridBagConstraints gbc_btnNext = new GridBagConstraints();
    gbc_btnNext.insets = new Insets(0, 0, 0, 5);
    gbc_btnNext.gridx = 10;
        gbc_btnNext.gridy = 9;
        step.add(btnNext, gbc_btnNext);
    }
}
